class Solution:
    def maxValue(self, n: int, index: int, maxSum: int) -> int:


if __name__ == '__main__':
    n = 4
    index = 2
    maxSum = 6
    solution = Solution()
    val = solution.maxValue(n,index,maxSum)
    print(val)